package cn.xuguowen.user.designPatten.chain_of_responsibility.heima;

/**
 * ClassName: GroupLeader
 * Package: cn.xuguowen.user.designPatten.chain_of_responsibility.heima
 * Description: 具体处理者（总经理）
 *
 * @Author 徐国文
 * @Create 2023/6/2 17:11
 * @Version 1.0
 */
public class GeneralLeader extends Handler{

    public GeneralLeader() {
        super(Handler.NUM_THREE,Handler.NUM_SEVEN);
    }

    @Override
    protected void handler(LeaveRequest leaveRequest) {
        System.out.println(leaveRequest.getName() + "发出请假的要求，请假天数：" + leaveRequest.getNum() + " 请假原因：" + leaveRequest.getReason());
        if (leaveRequest.getNum() > this.numEnd) {
            System.out.println("总经理无法审批请假！");
        } else {
            System.out.println("总经理审批请假！");
        }
    }
}
